<?php
if (! defined ( 'BASEPATH' ))
	exit ( 'No direct script access allowed' );

/**
 * Role information class.
 *
 * Role information's CRUD.
 */
class Commit_log_model extends CI_Model {
	private $db_name = 'k9deploy_new';
	private $table = 'commit_log';
	private $db = null;
	
	/**
	 * Constructor
	 *
	 * Sets the database used for
	 * information.
	 */
	public function __construct() {
		parent::__construct ();
		
		$this->db = $this->load->database ( $this->db_name, TRUE );
	}
	

	/**
         * get commit log
         *
         */
        public function get_commit_log($app = '' ,$env = ''){
		$this->db->order_by('id','desc')->limit(100);
                $commit_log = $this->db->get_where($this->table,array('app' => $app,'environment' => $env))->result_array();
		return $commit_log;
        }

}
